package com.example.jayzic.ui

import com.example.jayzic.ui.adapters.AlbumAdapter
import com.example.jayzic.ui.adapters.ArtistAdapter
import com.example.jayzic.ui.adapters.BaseAdapter
import com.example.jayzic.ui.adapters.PlaylistAdapter
import com.example.jayzic.ui.adapters.SongAdapter

fun getAdapterType(adapter: BaseAdapter<*>) =
when (adapter) {
    is AlbumAdapter -> {
        0
    }

    is ArtistAdapter -> {
        1
    }


    is PlaylistAdapter -> {
        2
    }

    is SongAdapter -> {
        3
    }

    else -> {
        throw IllegalArgumentException()
    }
}